description="Activate pinned app 9"
hidden="true"/>
+ <KeyListEntry name="open-new-window-application-1"
+ description="Open new window of pinned app 1"
+ hidden="true"/>
+
+ <KeyListEntry name="open-new-window-application-2"
+ description="Open new window of pinned app 2"
+ hidden="true"/>
+
+ <KeyListEntry name="open-new-window-application-3"
+ description="Open new window of pinned app 3"
+ hidden="true"/>
+
+ <KeyListEntry name="open-new-window-application-4"
+ description="Open new window of pinned app 4"
+ hidden="true"/>
+
+ <KeyListEntry name="open-new-window-application-5"
+ description="Open new window of pinned app 5"
+ hidden="true"/>
+
+ <KeyListEntry name="open-new-window-application-6"
+ description="Open new window of pinned app 6"
+ hidden="true"/>
+
+ <KeyListEntry name="open-new-window-application-7"
+ description="Open new window of pinned app 7"
+ hidden="true"/>
+
+ <KeyListEntry name="open-new-window-application-8"
+ description="Open new window of pinned app 8"
+ hidden="true"/>
+
+ <KeyListEntry name="open-new-window-application-9"
+ description="Open new window of pinned app 9"
+ hidden="true"/>
+
</KeyListEntries>
<default>["<Super>9"]</default>
<summary>Switch to application 9</summary>
</key>
+ <key name="open-new-window-application-1" type="as">
+ <default>["<Super><Control>1"]</default>
+ <summary>Open a new instance of application 1</summary>
+ </key>
+ <key name="open-new-window-application-2" type="as">
+ <default>["<Super><Control>2"]</default>
+ <summary>Open a new instance of application 2</summary>
+ </key>
+ <key name="open-new-window-application-3" type="as">
+ <default>["<Super><Control>3"]</default>
+ <summary>Open a new instance of application 3</summary>
+ </key>
+ <key name="open-new-window-application-4" type="as">
+ <default>["<Super><Control>4"]</default>
+ <summary>Open a new instance of application 4</summary>
+ </key>
+ <key name="open-new-window-application-5" type="as">
+ <default>["<Super><Control>5"]</default>
+ <summary>Open a new instance of application 5</summary>
+ </key>
+ <key name="open-new-window-application-6" type="as">
+ <default>["<Super><Control>6"]</default>
+ <summary>Open a new instance of application 6</summary>
+ </key>
+ <key name="open-new-window-application-7" type="as">
+ <default>["<Super><Control>7"]</default>
+ <summary>Open a new instance of application 7</summary>
+ </key>
+ <key name="open-new-window-application-8" type="as">
+ <default>["<Super><Control>8"]</default>
+ <summary>Open a new instance of application 8</summary>
+ </key>
+ <key name="open-new-window-application-9" type="as">
+ <default>["<Super><Control>9"]</default>
+ <summary>Open a new instance of application 9</summary>
+ </key>
<key name="show-screenshot-ui" type="as">
<default>["Print"]</default>
<summary>Take a screenshot interactively</summary>
Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
this._switchToApplication.bind(this));
+ this.addKeybinding('open-new-window-application-1',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
+ this.addKeybinding('open-new-window-application-2',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
+ this.addKeybinding('open-new-window-application-3',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
+ this.addKeybinding('open-new-window-application-4',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
+ this.addKeybinding('open-new-window-application-5',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
+ this.addKeybinding('open-new-window-application-6',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
+ this.addKeybinding('open-new-window-application-7',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
+ this.addKeybinding('open-new-window-application-8',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
+ this.addKeybinding('open-new-window-application-9',
+ new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
+ this._openNewApplicationWindow.bind(this));
+
global.stage.connect('scroll-event', (stage, event) => {
const allowedModes = Shell.ActionMode.NORMAL;
if ((allowedModes & Main.actionMode) === 0)
return Main.sessionMode.hasOverview;
}
- _switchToApplication(display, window, binding) {
+ _getNthFavoriteApp(n) {
if (!this._allowFavoriteShortcuts())
- return;
+ return null;
- let [, , , target] = binding.get_name().split('-');
- let apps = AppFavorites.getAppFavorites().getFavorites();
- let app = apps[target - 1];
+ const apps = AppFavorites.getAppFavorites().getFavorites();
+ return apps[n];
+ }
+
+ _switchToApplication(display, window, binding) {
+ const [, , , target] = binding.get_name().split('-');
+ const app = this._getNthFavoriteApp(target - 1);
if (app) {
Main.overview.hide();
app.activate();
}
}
+ _openNewApplicationWindow(display, window, binding) {
+ const [, , , , target] = binding.get_name().split('-');
+ const app = this._getNthFavoriteApp(target - 1);
+ if (app)
+ app.open_new_window(-1);
+ }
+
_toggleCalendar() {
Main.panel.toggleCalendar();
}